<%@page import="java.util.List,com.crm.entity.Opportunity" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/temp.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- InstanceBeginEditable name="doctitle" -->
<!-- InstanceEndEditable -->
<link href="<%=application.getContextPath() %>/css/css-crm.css" rel="stylesheet" type="text/css" />
<script  type="text/javascript" src="<%=application.getContextPath()%>/js/jquery-1.6.min.js"></script> 
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</head>

<body>
<div id="main">
  <%@include file="common/header.jsp" %>
	  <%@include file="common/submenu.jsp" %>
  
  <div id="content"><!-- InstanceBeginEditable name="EditRegion3" -->
   <div id="enqclient" style="display: none;" align="center" class="result_msg"></div>
  <form action="<%=application.getContextPath() %>/deliveryChallan/saveDC.do" method="post">
    <div id="work-area2">
      <div class="heading2">Delivery Challan</div>
	  
      <div class="boxIFS">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="366" align="left" valign="top"><table width="348" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="44">&nbsp;</td>
                <td width="137">&nbsp;</td>
                <td width="167">&nbsp;</td>
              </tr>
              <tr>
              <%
              List<Opportunity> lopp=(List<Opportunity>)request.getAttribute("oppList");
              %>
                <td height="28">&nbsp;</td>
                <td align="left" valign="top">Reference Number </td>
                <td align="left" valign="top">
                <select name="refList" class="form" id="refListId">
                <option value="">Please Select</option>
                <%for(int i=0;i<lopp.size();i++){
                	%>
                	<option value="<%=lopp.get(i).getRefNum() %>"><%=lopp.get(i).getRefNum() %></option>
                <% }%>
                </select></td>
              </tr>
              <tr>
                <td height="5"></td>
                <td height="5" align="left" valign="top"></td>
                <td height="5" align="left" valign="top"></td>
              </tr>
              <tr>
                <td height="5"></td>
                <td height="5" align="left" valign="top"></td>
                <td height="5" align="left" valign="top"></td>
              </tr>
              
              <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
            </table></td>
          </tr>
        </table>
      </div>
      
          <div id="ajaxLoader" style="display:none" align="center"><img src="<%=application.getContextPath()%>/images/ajax_loader.gif"/></div>
      <table style="height:300px; width:910px;" ><tr><td><div id="Res" class="boxtable" style="display:none" ></div></td></tr></table> 

    </div>
    </form>
  </div><div id="footer"></div>  
</div>
</body>
<!-- InstanceEnd --></html>
<script type="text/javascript">
$("#refListId").change(function(){
	var refList=$("#refListId").val();
	if(refList!=null && refList!="" && refList!="Please Select"){
		$("#ajaxLoader").show();
		$.ajax({
			url:"<%=application.getContextPath()%>/deliveryChallan/getDC.do",
			method:"post",
			data:"refList="+refList,
			success:function(res){
				$("#Res").html(res);
				$("#Res").show();
			}
		}).done(function(html){
			$("#ajaxLoader").hide();
			/* alert("Ajax Loading Completed"); */
		}).fail(function(html){
			$("#ajaxLoader").hide();
			alert("Failed To Load the Data");
		});
	}
});
</script>